package st.business.tepth.business.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangyu
 * @date 2019/3/25
 * 保养过检数据
 */
public class MaintainPassInfoBean implements Parcelable {

    /**
     * repairTaskId : 110
     * workerList : [{"user_name":"李世健","job_no":"20100787"}]
     * vehicleSeriesName : 发动机系
     * repairMaintenanceOperation : [{"id":1,"name":"清洁检查"}]
     * phenomenonList : [{"repairPhenomenonName":"发动机发吐","alarmRecord":"无","workContent":"更换发动机"}]
     */
    //1 未过检 2已过检
    private int checkStatus;
    private int repairTaskId;
    private String vehicleSeriesName;
    private List<PersonBean> workerList;
    private List<MaintainWorkBean> repairMaintenanceOperation;
    private List<PhenomenonListBean> phenomenonList;
    private int operationState;
    public int getCheckStatus() {
        return checkStatus;
    }

    public int getOperationState() {
        return operationState;
    }

    public void setOperationState(int operationState) {
        this.operationState = operationState;
    }

    public void setCheckStatus(int checkStatus) {
        this.checkStatus = checkStatus;
    }

    public int getRepairTaskId() {
        return repairTaskId;
    }

    public void setRepairTaskId(int repairTaskId) {
        this.repairTaskId = repairTaskId;
    }

    public String getVehicleSeriesName() {
        return vehicleSeriesName;
    }

    public void setVehicleSeriesName(String vehicleSeriesName) {
        this.vehicleSeriesName = vehicleSeriesName;
    }

    public List<PersonBean> getWorkerList() {
        return workerList;
    }

    public void setWorkerList(List<PersonBean> workerList) {
        this.workerList = workerList;
    }

    public List<MaintainWorkBean> getRepairMaintenanceOperation() {
        return repairMaintenanceOperation;
    }

    public void setRepairMaintenanceOperation(List<MaintainWorkBean> repairMaintenanceOperation) {
        this.repairMaintenanceOperation = repairMaintenanceOperation;
    }

    public List<PhenomenonListBean> getPhenomenonList() {
        return phenomenonList;
    }

    public void setPhenomenonList(List<PhenomenonListBean> phenomenonList) {
        this.phenomenonList = phenomenonList;
    }


    public static class PhenomenonListBean implements Parcelable {
        /**
         * repairPhenomenonName : 发动机发吐
         * alarmRecord : 无
         * workContent : 更换发动机
         */

        private String phenomenonName;
        private String alarmRecord;
        private String workContent;

        public String getPhenomenonName() {
            return phenomenonName;
        }

        public void setPhenomenonName(String phenomenonName) {
            this.phenomenonName = phenomenonName;
        }

        public String getAlarmRecord() {
            return alarmRecord;
        }

        public void setAlarmRecord(String alarmRecord) {
            this.alarmRecord = alarmRecord;
        }

        public String getWorkContent() {
            return workContent;
        }

        public void setWorkContent(String workContent) {
            this.workContent = workContent;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.phenomenonName);
            dest.writeString(this.alarmRecord);
            dest.writeString(this.workContent);
        }

        public PhenomenonListBean() {
        }

        protected PhenomenonListBean(Parcel in) {
            this.phenomenonName = in.readString();
            this.alarmRecord = in.readString();
            this.workContent = in.readString();
        }

        public static final Creator<PhenomenonListBean> CREATOR = new Creator<PhenomenonListBean>() {
            @Override
            public PhenomenonListBean createFromParcel(Parcel source) {
                return new PhenomenonListBean(source);
            }

            @Override
            public PhenomenonListBean[] newArray(int size) {
                return new PhenomenonListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.repairTaskId);
        dest.writeString(this.vehicleSeriesName);
        dest.writeTypedList(this.workerList);
        dest.writeTypedList(this.repairMaintenanceOperation);
        dest.writeList(this.phenomenonList);
    }

    public MaintainPassInfoBean() {
    }

    protected MaintainPassInfoBean(Parcel in) {
        this.repairTaskId = in.readInt();
        this.vehicleSeriesName = in.readString();
        this.workerList = in.createTypedArrayList(PersonBean.CREATOR);
        this.repairMaintenanceOperation = in.createTypedArrayList(MaintainWorkBean.CREATOR);
        this.phenomenonList = new ArrayList<PhenomenonListBean>();
        in.readList(this.phenomenonList, PhenomenonListBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<MaintainPassInfoBean> CREATOR = new Parcelable.Creator<MaintainPassInfoBean>() {
        @Override
        public MaintainPassInfoBean createFromParcel(Parcel source) {
            return new MaintainPassInfoBean(source);
        }

        @Override
        public MaintainPassInfoBean[] newArray(int size) {
            return new MaintainPassInfoBean[size];
        }
    };
}
